#include "CharacterObserver.h"

#include <iostream>


CharacterObserver::CharacterObserver(Character* a):character(a)
{
	strength = character->getStrength();
	craft = character->getCraft();
	gold = character->getGold();
	lives = character->getLives();
	fate = character->getFate();


    character->registerOb(this);
}
void CharacterObserver::show()
{
	cout << "------------------ ENEMY VIEW ------------------" << endl;
	cout << "Strength: " << strength << endl;
	cout << "Craft:    " << craft << endl;
	cout << "Fate:     " << fate << endl;
	cout << "Lives:    " << lives << endl;
	cout << "Gold:     " << gold << endl << endl;
	cout << "------------------------------------------------" << endl;

}
 
void CharacterObserver::update()
{

	strength = character->getStrength();
	lives = character->getLives();
	gold = character->getGold();
	craft = character->getCraft();
	fate = character->getFate();

	show();
}